#region Used Namespaces

using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using ContactPrinter.Model.Interfaces;

#endregion

namespace ContactPrinter.Logic.Interfaces
{
    [ContractClass(typeof(ContactServiceContract))]
    public interface IContactService
    {
        IEnumerable<IGroup> GetGroups();
        IEnumerable<IContact> GetAllContactsFromGroup(string group);
    }

    [ContractClassFor(typeof(IContactService))]
    public abstract class ContactServiceContract : IContactService
    {
        #region Implementation of IContactService

        public IEnumerable<IGroup> GetGroups()
        {
            return null;
        }

        public IEnumerable<IContact> GetAllContactsFromGroup(string group)
        {
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(group));
            return null;
        }

        #endregion
    }
}